<!-- BOTTOM SPOTLIGHT -->
<?php $size = 100/count($views_list);?>
<div id="ja-botsl">
	<div class="main clearfix">
<?php for ($i = 0; $i < count($views_list); $i++) {?>	
	<?php if($views_list[$i]['view']=='latest') {?>
		<!-- Latest -->
		<div class="ja-box column ja-box-left" style="width: <?php echo $size;?>%;">
			<div class="ja-module ja-box-br module title-orange" id="Mod63">
				<div class="ja-box-bl">
					<div class="ja-box-tr">
						<div class="ja-box-tl clearfix">
							<h3><span><strong class="first-word"><strong><?php echo $latest_tag_title?> </strong></strong><?php echo $latest_heading_title?></span></h3>
							<div class="jamod-content ja-box-ct clearfix">
								<div id="ja-bulletin">
									<ul class="ja-bulletin title-orange clearfix">
										<?php if ($products) { ?>
											<?php for ($ii = 0; $ii < sizeof($products); $ii = $ii + 3) { ?>
		         		 						<?php for ($jj = $ii; $jj < ($ii + 3); $jj++) { ?>
		         		 							<?php if (isset($products[$jj])) { ?>
														<li>
															<div  class="box-right">
																<a href="<?php echo str_replace('&', '&amp;', $products[$jj]['href']); ?>" class="mostread title-orange"><?php echo $products[$jj]['name']; ?></a>
															</div>
				
														</li>
													<?php }?>
												<?php }?>
											<?php }?>
										<?php }?>
									</ul>
								</div>
								<script type="text/javascript">
								  var Ja_direction = '';
								  var cookie_path = '../';
								  var cur_template_name = 'ja_rasite';
								  window.addEvent('load', function(){
									 
										   if(typeof(tmpl_name) =='undefined')
										   {
											  cookie_path = "ja_rasite_direction";
										   }
										   else
										   {
											  cookie_path = tmpl_name+"_direction";
										   }
										   Ja_direction = Cookie.get(cookie_path);
										   if(!Ja_direction)
										   {
												cookie_path = cookie_path.replace("_direction","_profile");
											   Ja_direction = Cookie.get(cookie_path); 
										   }
										   var style_l_value = 'auto';
										   if(Ja_direction == 'rtl')
											{
											  			//	var ul_wrapper = $('Mod63').getElement("ul.ja-bulletin");
											//	ul_wrapper.getElements("li img").each();
											}
									});
								</script>
								<script type="text/javascript" language="javascript">
								 function setStyleLinkWithRTLDirection()
								 {
								    var links = document.getElementsByTagName ('link');
										var script = document.createElement('link');
									script.setAttribute('type', 'text/css');
									script.setAttribute('rel', 'stylesheet');
									script.setAttribute('href', 'modules/mod_jabulletin/assets/mod_jabuletin_rtl.css');
									document.getElementsByTagName("head")[0].appendChild(script);
								 }	
								</script>
							</div>
						</div>
					</div>
				</div>
			</div>	
		</div>
	<!-- End Latest -->
<?php } ?>
<?php if($views_list[$i]['view']=='hot') {?>
	<!-- Hot -->
		<div class="ja-box column ja-box-center" style="width: <?php echo $size;?>%;">
			<div class="ja-module ja-box-br module" id="Mod64">
				<div class="ja-box-bl">
					<div class="ja-box-tr">
						<div class="ja-box-tl clearfix">
							<h3><span><strong class="first-word"><strong><?php echo $hot_tag_title;?> </strong></strong><?php echo $hot_heading_title;?></span></h3>
							<div class="jamod-content ja-box-ct clearfix">
								<div id="ja-bulletin">
									<ul class="ja-bulletin clearfix">
										<?php foreach ($articles as $article) { ?>
										<li>
											<div  class="box-right">
												<a href="<?php echo str_replace('&', '&amp;', $article['href']); ?>" class="mostread"><?php echo $article['name']; ?></a>
											     - <span><?php echo $article['date']; ?></span>
											</div>
										</li>
										<?php }?>
									</ul>
								</div>
								<script type="text/javascript">
								  var Ja_direction = '';
								  var cookie_path = '../';
								  var cur_template_name = 'ja_rasite';
								  window.addEvent('load', function(){
									 
										   if(typeof(tmpl_name) =='undefined')
										   {
											  cookie_path = "ja_rasite_direction";
										   }
										   else
										   {
											  cookie_path = tmpl_name+"_direction";
										   }
										   Ja_direction = Cookie.get(cookie_path);
										   if(!Ja_direction)
										   {
												cookie_path = cookie_path.replace("_direction","_profile");
											   Ja_direction = Cookie.get(cookie_path); 
										   }
										   var style_l_value = 'auto';
										   if(Ja_direction == 'rtl')
											{
											  					setStyleLinkWithRTLDirection();
														//	var ul_wrapper = $('Mod64').getElement("ul.ja-bulletin");
											//	ul_wrapper.getElements("li img").each();
											}
									});
								</script>
							</div>
						</div>
					</div>
				</div>
			</div>	
		</div>
	<!-- End Hot -->
<?php }?>
<?php if($views_list[$i]['view']=='event') {?>
	<!-- Event -->
		<div class="ja-box column ja-box-center" style="width: <?php echo $size;?>%;">
			<div class="ja-module ja-box-br module_menu title-green" id="Mod31">
				<div class="ja-box-bl">
					<div class="ja-box-tr">
						<div class="ja-box-tl clearfix">
							<h3><span><strong class="first-word"><strong><?php echo $event_tag_title;?> </strong></strong><?php echo $event_heading_title;?></span></h3>
							<div class="jamod-content ja-box-ct clearfix">
								<ul class="menu">
									<li class="item11">
										<a href="../../www.joomla.org/default.htm">
											<span>Joomla! Home</span>
										</a>
									</li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>	
		</div>
	<!-- End Event -->	
<?php }?>
<?php if($views_list[$i]['view']=='contact') {?>
<!-- Contact -->
		<div class="ja-box column ja-box-right" style="width: <?php echo $size;?>%;">
			<div class="ja-module ja-box-br module title-black" id="Mod55">
				<div class="ja-box-bl">
					<div class="ja-box-tr">
						<div class="ja-box-tl clearfix">
							<h3><span><strong class="first-word"><strong><?php echo $contact_tag_title; ?> </strong></strong><?php echo $contact_heading_title; ?></span></h3>
							<div class="jamod-content ja-box-ct clearfix">
								<p></p>
								<ul>
		 							<li><a href="index.php"><?php echo $store; ?></a></li>
		 							<li><?php echo $address; ?></li>
		 							<?php if ($telephone) { ?>
		 							<li><?php echo $telephone; ?></li>
		 							<?php } ?>
            						<?php if ($fax) { ?>
		 							<li><?php echo $fax; ?></li>
		 							<?php } ?>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>	
		</div>
	<!-- End Contact -->
<?php }?>
<?php } ?>
	</div>
</div>
<!-- //BOTTOM SPOTLIGHT -->